home *** CD-ROM | disk | FTP | other *** search
/ Aminet 24 / Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso / Aminet / util / time / backclock.lha / BackClock / sources / utils.h < prev   
C/C++ Source or Header  |  1998-02-08  |  2KB  |  61 lines

  1. #include <intuition/intuition.h>
  2. #include <devices/timer.h>
  3. #include <exec/ports.h>
  4. #include <dos/dos.h>
  5. #include <dos/dosextens.h>
  6. #include <libraries/notifyintuition.h>
  7. #include <workbench/startup.h>
  8.  
  9. #define ERRORNOMEM 1
  10. #define TITLE      "BackClock V1.2"
  11. #define OK         -1
  12. struct specWin {
  13.   ULONG posX ;
  14.   ULONG posY ;
  15.   ULONG width ;
  16.   ULONG height ;
  17.   ULONG back ;
  18. } ;
  19.  
  20. struct prjSt {
  21.   struct Window * win ;                   // remplit par OpenWindow()
  22.   struct DateStamp * date ;                    // date au format interne
  23.   char   datestr[10] ;                                    // date au format ASCII
  24.   UBYTE  heu ;                                                // heure
  25.   UBYTE  min ;                                                // minute
  26.   UBYTE  sec ;                                                // secondes
  27.   UBYTE  oldH ;                                            // derniere heure affichée
  28.   UBYTE  oldM ;                                            //     "     min      " 
  29.   UBYTE  oldS ;                                            //     "     sec      " 
  30.   struct RDArgs      * args ;                            // ReadArgs
  31.   struct timerequest * treq ;                            // requete I/O timer.device
  32.   struct MsgPort     * trport ;                        // port rply timer
  33.   UBYTE  timerok ;                                        // ouverture timer ok
  34.   struct IntNotifyRequest * Notify ;                // requete notify
  35.   struct MsgPort          * notifyPort ;            // port reply notify
  36.   struct specWin backWin ;
  37. } ;
  38. struct backMsg {
  39.   struct Message execmsg ;
  40.   ULONG Class ; // not used
  41. } ;
  42.  
  43. typedef prjSt idWin ;
  44.  
  45.  
  46. // proto  
  47. idWin * init(WBArg *) ;
  48. void close(idWin *) ;
  49. void getDate(idWin *) ;
  50. void writeDate(idWin *) ;
  51. extern void DateToByte(register __a0 char *, register __a1 idWin *) ;
  52. void initwin(idWin * prj) ;
  53. void processwin(idWin* prj) ;
  54. void effacer(idWin * prj) ;
  55. void retracer(idWin * prj) ;
  56. int initTimer(idWin * prj) ;
  57. void closeTimer(idWin * prj) ;
  58. void runtimer(idWin * prj) ;
  59. void setArgs(idWin * prj, LONG * args) ;
  60. int readToolValue(char ** toolarr, char * argtype, int argdef) ;
  61. int exists() ;